<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="<?=base_url()?>res/css/css.css" rel="stylesheet" type="text/css" />
    </head>
                    <table style="margin: 0 auto" class="formtable"  width="680" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="2" align="center" valign="middle">&nbsp;ข้อมูลนักศึกษา</th>
                      </tr>
                      <tr>
                        <th width="177" align="right" valign="middle">&nbsp;ชื่อ-นามสกุล :</th>
                        <td width="423" align="left" valign="middle">&nbsp;<b> <?=$collegian_datay->collegian_name?></b></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;รหัสนักศึกษา :</th>
                        <td align="left" valign="middle">&nbsp;<?=$collegian_datay->collegian_code?>fasfas   <?=get_level($collegian_datay->collegian_code)?></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;สาขาวิชา :</th>
                        <td align="left" valign="middle">&nbsp;<?=$collegian_datay->major_title?></td>
                      </tr>
                      <tr>
                        <th align="right" valign="middle">&nbsp;ชั้นปี :</th>
                        <td align="left" valign="middle">&nbsp;<?=get_level($collegian_datay->collegian_code)?></td>
                      </tr>
                    </table>
                     <div style="height:30px"></div>
                    <table style="margin: 0 auto"  align="center"  class="formtable" width="94%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="8" align="center" valign="middle">
                            &nbsp;<b>แสดงข้อมูลการขาดกิจกรรม <?=$activity_y->num_rows()?>  กิจกรรม</b>
                        </th>
                      </tr>
                      <tr>
                        <th width="2%" align="center" valign="middle">ลำดับ</th>
                        <th width="13%" align="center" valign="middle">ชื่อกิจกรรม</th>
                        <th width="5%" align="center" valign="middle">เริ่มลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">เริ่มกิจกรรม</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดกิจกรรม</th>
                        <th width="2%" align="center" valign="middle">คะแนน</th>
                      </tr>
                      <?php $no = 1;$score_max_y = 0; ?>
                      <?php foreach($activity_y->result_array() as $row){  ?>
                      <tr class="tr-red">
                        <td align="center" valign="middle">&nbsp;<b><?=$no?></b></td>
                        <td align="left" valign="middle">&nbsp;<?=$row["act_title"]?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_date"])?></td>
                        <td align="center" valign="middle">
                            &nbsp;<?=$row["score_max"]?>
                        </td>
                      </tr>
                      <?php $no++;$score_max_y+=$row["score_max"];} ?>
                      <?php if($activity_y->num_rows() > 0){ ?>
                     <tr>
                         <td colspan="6" align="right" valign="middle">&nbsp;<b> รวมคะแนน : </b></td>
                        <td align="center" valign="middle">
                            &nbsp;<b> <?=$score_max_y?> </b>
                        </td>
                      </tr>
                      <?php } ?>
                    </table>
                    <div style="height:30px"></div>
                    <table style="margin: 0 auto"  align="center"  class="formtable" width="94%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th colspan="8" align="center" valign="middle">
                            &nbsp;<b>แสดงข้อมูลการเข้าร่วมกิจกรรม <?=$activity_n->num_rows()?>  กิจกรรม</b>
                        </th>
                      </tr>
                      <tr>
                        <th width="2%" align="center" valign="middle">ลำดับ</th>
                        <th width="13%" align="center" valign="middle">ชื่อกิจกรรม</th>
                        <th width="5%" align="center" valign="middle">เริ่มลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดลงทะเบียน</th>
                        <th width="6%" align="center" valign="middle">เริ่มกิจกรรม</th>
                        <th width="6%" align="center" valign="middle">สิ้นสุดกิจกรรม</th>
                        <th width="6%" align="center" valign="middle">ประเภท</th>
                        <th width="2%" align="center" valign="middle">คะแนน</th>
                      </tr>
                      <?php $no = 1;$score_max_n = 0; ?>
                      <?php foreach($activity_n->result_array() as $row){  ?>
                      <tr>
                        <td align="center" valign="middle">&nbsp;<b><?=$no?></b></td>
                        <td align="left" valign="middle">&nbsp;<?=$row["act_title"]?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_reg_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_start_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=setDate($row["act_end_date"])?></td>
                        <td align="center" valign="middle">&nbsp;<?=($row["act_type"] == "YES")?"บังคับ":"เลือก"?></td>
                        <td align="center" valign="middle">
                            &nbsp;<?=$row["score_max"]?>
                        </td>
                      </tr>
                      <?php $no++;$score_max_n+=$row["score_max"];} ?>
                      <?php if($activity_n->num_rows() > 0){ ?>
                     <tr >
                         <td colspan="7" align="right" valign="middle">&nbsp;<b> รวมคะแนน : </b></td>
                        <td align="center" valign="middle">
                            &nbsp;<b> <?=$score_max_n?> </b>
                        </td>
                      </tr>
                      <?php } ?>
                    </table>
                    <script>
                       window.print();
                    </script>
</html>